<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <link rel="stylesheet" href="${ctx}/statics/css/blanceDrop.css">
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>
    <style>
        .bootstrap-table .fixed-table-container .table thead th .th-inner {
            text-align: center !important;
        }
        .btn{
            margin-top: 0 !important;
        }
        .table > tbody > tr > .operate-td, .table > tfoot > tr > .operate-td{
            padding: 0 !important;
        }
        .fixed-table-body-columns{
            top: 55px !important;
            margin-left: 1px !important;
            border-top:2px solid #e7e7e7
        }
        .fixed-table-body-columns tr{
            border-right: 4px solid #e7e7e7 !important;
        }
        .fixed-table-body-columns1{
            /*left: unset !important;*/
            width: 220px !important;
            /*margin-left:0 !important;*/
            /*top: 55px !important;*/
            /*border-right: none;*/
            /*border-top:2px solid #e7e7e7*/
        }
    </style>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>分销商结算</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>对账单</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.go(-1);"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <input type="hidden" name="billOrderId" id="billOrderId" >
    <input type="hidden" id="billTotalMoney" >
    <input type="hidden" name="tenantOperatorCode" id="tenantOperatorCode"
           value="${tenantOperatorCode}">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <input id="billOrderNum" name="billOrderNum" type="text"
                           class="form-control shortInput input-distance"
                           placeholder="结算订单号">
                    <select name="elecStationId" id="elecStationId" class="form-control shortInput input-distance">
                        <option value="">站点选择</option>
                        <c:forEach items="${elecStationList}" var="elecStation">
                            <option value="${elecStation.elecStationId}">${elecStation.stationName}</option>
                        </c:forEach>
                    </select>
                    <%-- 状态 0待审核 1运营商已审核 2复核中 3结算完成 默认0 --%>
                    <select name="status" id="status" class="form-control shortInput input-distance">
                        <option value="">状态</option>
                        <option value="0">待审核</option>
                        <option value="1">待确认账单</option>
                        <option value="2">待复核</option>
                        <option value="3">结算完成</option>
                        <option value="4">待推送</option>
                    </select>
                    <input id="startTime" name="startTime" type="text" class="form-control shortInput input-distance"
                           placeholder="账单开始时间" readonly>
                    <input id="endTime" name="endTime" type="text" class="form-control shortInput input-distance"
                           placeholder="账单结束时间" readonly>
                    <button class="btn btn-success input-distance" onclick="acctBillOrder.reLoad()">查询</button>
                    <button type="button" class="btn btn-success marginright-auto input-distance"
                            onclick="acctBillOrder.exportAcctBillOrder()">
                        导出
                    </button>
                </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>

                <%--  关联审核明细的模态框  --%>
                <%--  关联审核明细的模态框  --%>
                <div class="auditingModal hide">
                    <span style="position: absolute;right: 20px;top: 5px;cursor: pointer" onclick="acctBillOrder.closeBtn()">X</span>
                    <div class="title">请认真查看结算单数据，如需调整金额，可在下面调整金额操作框进行调整！</div>
                    <div class="inputBlock">
                        <span class="label">调整电费:</span><input type="number"  id="adjustElecAmount" name="adjustElecAmount" step="0.01"><span class="inputTips">向上调是正数，向下调是负数</span>
                    </div>
                    <div class="inputBlock">
                        <span class="label">调整服务费:</span><input type="number"  id="adjustServiceAmount" name="adjustServiceAmount" step="0.01"><span class="inputTips">向上调是正数，向下调是负数</span>
                    </div>
                    <div class="inputBlock">
                        <span class="label" style="flex-shrink: 0">备注:</span><textarea style="width: 100%" rows="5" id="remark"
                                                                                       name="remark"></textarea>
                    </div>
                    <div class="buttonBlock">
                        <div class="cancleButton" onclick="acctBillOrder.closeBtn()">取消</div>
                        <div class="confirmButton addReviewAcctBillOrder">确定</div>
                    </div>
                </div>

            </div>

        </div>
    </div>
</div>
<script type="text/javascript" src="${ctx}/appjs/acct/acctBillOrder.js"></script>
<script type="text/javascript">

    // //日期范围限制
    var start = {
        elem: '#startTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(), //设定最小日期为当前日期
        // max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false
    };
    var end = {
        elem: '#endTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(),
        // max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false
    };
    laydate(start);
    laydate(end);
    laydate.skin('molv');//皮肤

    // function clearNoNum(obj) {
    //     obj.value = obj.value.replace(/[^\d./\-{1}]/g, "");  //清除“数字”和“.”以外的字符
    //     obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
    //     obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
    //     obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d\d\d\d).*$/, '$1$2.$3');//只能输入两个小数
    //     // if (obj.value.indexOf(".") < 0 && obj.value != "") {//以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
    //     //     obj.value = parseFloat(obj.value);
    //     // }
    // }
    acctBillOrder.init();
</script>
</body>
</html>